import Vue from 'vue';
import store from '../store';

Vue.directive('perm', function (el, binding) {
  const isAdmin = store.getters.superAdmin
  if (!isAdmin && !store.state.user.permission.some(el => el === binding.value)) {
    el.style.display = 'none'
  }
})
